package com.logicwin.RobotTravel.Screens;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;

import com.logicwin.RobotTravel.R;
import com.logicwin.RobotTravel.utils.SystemParams;

public class ScreenForecast extends Screen {
	
	public ScreenForecast() {
		super(SCREEN_TYPE.FORECAST_T, ScreenForecast.class.getCanonicalName());
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.screen_forecast);
		
		RelativeLayout layout = (RelativeLayout) this.findViewById(R.id.forecast_relativeLayout);
		
		FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) layout.getLayoutParams();
		params.width = SystemParams.getWindowWidth(this);
		params.height = SystemParams.getWindowHeight(this);
		layout.setLayoutParams(params);
		
        ImageView view = (ImageView) this.findViewById(R.id.screen_forecast);
        Resources res = this.getResources();
        Bitmap image = BitmapFactory.decodeResource(res, R.drawable.screen_forecast);
        //view.setImageBitmap(image);
        view.setImageBitmap(SystemParams.adjustBitmapBasedOnScreen(image, this));
        
	}
	

}
